package com.last1mile.dao.ibatis.impl;

import java.util.List;

import org.springframework.stereotype.Component;

import com.last1mile.dao.BaseSqlMapClientDao;
import com.last1mile.dao.interfaces.SubscribeDao;
import com.last1mile.pojo.SubscribeDO;

@Component("subscribeDao")
public class SubscribeDaoImpl extends BaseSqlMapClientDao implements SubscribeDao {

    @Override
    public Integer inserSubscribe(SubscribeDO subscribeDo) {
        return (Integer) getSqlMapClientTemplate().insert("subscribe.insertSubscribe", subscribeDo);
    }

    @Override
    public Integer countSubscribe(SubscribeDO subscribeDo) {
        return (Integer) getSqlMapClientTemplate().queryForObject("subscribe.countBySubscribeDo", subscribeDo);
    }

	@SuppressWarnings("unchecked")
	@Override
	public List<Integer> queryMerServeIdByPerId(Integer perId) {
		// TODO Auto-generated method stub
		return (List<Integer>)getSqlMapClientTemplate().queryForList("subscribe.queryMerServeIdByPerId", perId);
	}

}
